package lee.lxwei.boot.web;

import lee.lxwei.boot.dto.BaseRes;
import lee.lxwei.boot.dto.InfoRes;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 返回信息 统一处理 如加签等操作
 */
@RestController
@RequestMapping("testBase")
public class TestBaseController {

    @GetMapping("t1")
    public BaseRes testBase() {
        return new BaseRes("0000", "success");
    }

    @GetMapping("t2")
    public InfoRes testBase2() {
        InfoRes resultInfoRes = new InfoRes();
        resultInfoRes.setName("luckylee");
        resultInfoRes.setAddress("code");
        resultInfoRes.setMsg("success");
        resultInfoRes.setCode("0000");

        return resultInfoRes;
    }


}
